<template>
<div class="app-container">
   <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="待办任务" name="first">
     <virtualtodo v-if="activeName == 'first'"></virtualtodo>
    </el-tab-pane >
    <el-tab-pane label="已办任务" name="second">
      <virtualfinished v-if="activeName == 'second'"></virtualfinished>

    </el-tab-pane>
    <el-tab-pane  v-if="checkPermi(['workflow:virtualMachine:manage'])" label="虚拟机申请管理" name="third">
      <virtualgather v-if="activeName == 'third'"></virtualgather>

    </el-tab-pane>
  </el-tabs>

</div>

</template>

<script>
import virtualfinished from './components/virtualfinished.vue';
import virtualtodo from './components/virtualtodo.vue';
import virtualgather from './components/virtualgather.vue'



export default {
  name:'VirtualMachine',
  components:{
    virtualtodo,
    virtualfinished,
    virtualgather
  },
  data(){
    return{
      activeName:'first'
    }
  },
  methods:{
    
     handleClick(tab, event) {
      this.activeName = tab.name
      }
  }

}
</script>

<style>

</style>
